home *** CD-ROM | disk | FTP | other *** search
/ Network Support Library / RoseWare - Network Support Library.iso / apidev / sap.arc / SAPA.ASM < prev    next >
Assembly Source File  |  1988-04-06  |  3KB  |  170 lines

  1. ;*****************************************************************************
  2. ;*
  3. ;* Program Name:  SAP_ASSEMBLY
  4. ;*
  5. ;* Filename:      sapa.asm
  6. ;*
  7. ;* Date Created:  March 22, 1988
  8. ;*
  9. ;* Version:      1.0
  10. ;*
  11. ;* Programmers:      Bryan Sparks
  12. ;*
  13. ;* Comments:      Assembler routines for SAP Event Service Routines and
  14. ;*          for IPX funtions.
  15. ;*
  16. ;*****************************************************************************
  17.     name    SAP
  18.  
  19. DGroup    GROUP    _DATA
  20. _DATA    segment word public 'DATA'
  21.     assume    ds:DGroup
  22. _DATA    ends
  23.  
  24. PGroup    GROUP    _TEXT
  25.     assume    cs:PGroup
  26.  
  27. _TEXT    segment    byte public 'CODE'
  28.  
  29.     public    _SAPWaitESRHandler
  30.     public    _SAPAdvertiseESRHandler
  31.     public     _IPXGetInternetworkAddress
  32.     public     _IPXSendPacket
  33.     public    _IPXScheduleIPXEvent
  34.     public    _IPXCancelEvent
  35.     public    _IntSwap
  36.  
  37.  
  38.     extrn    _SAPWaitESR: near
  39.     extrn    _SAPAdvertiseESR: near
  40.  
  41.  
  42. ;    
  43. ;    This is the front-end procedure to the C function "SAPWaitESR"
  44. ;
  45. _SAPWaitESRHandler    proc    far
  46.     mov    ax, DGroup
  47.     mov    ds, ax
  48.     push    es
  49.     push    si
  50.     call    _SAPWaitESR
  51.     add    sp, 4
  52.     ret    
  53. _SAPWaitESRHandler    endp
  54.  
  55. ;
  56. ;    This is the front-end procedure to the C function "SAPAdvertiseESR"
  57. ;
  58. _SAPAdvertiseESRHandler        proc    far
  59.     mov    ax, DGroup
  60.     mov    ds, ax
  61.     push    es
  62.     push    si
  63.     call    _SAPAdvertiseESR
  64.     add    sp, 4
  65.     ret    
  66. _SAPAdvertiseESRHandler    endp
  67.  
  68.  
  69. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  70. ;;The following are a set of IPX routines used in the program.
  71. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  72.  
  73. ;Parameters:
  74. ;    On Entry:    10 byte buffer
  75. ;    On Exit:    10 byte buffer will contain address
  76. _IPXGetInternetworkAddress    proc near
  77.     push     bp
  78.     mov     bp,sp
  79.  
  80.     mov    ax, DGroup
  81.     mov    es, ax
  82.     mov     bx, [bp+4]    
  83.     mov     si, bx
  84.     mov     bx, 09h
  85.     int     7Ah
  86.     push    ds
  87.     pop    es
  88.  
  89.     pop     bp
  90.     ret
  91. _IPXGetInternetworkAddress endp
  92.  
  93.  
  94. ;Parameters
  95. ;    On Entry:    Pointer to ECB
  96. _IPXSendPacket proc near
  97.     push     bp
  98.     mov     bp, sp
  99.  
  100.     mov    ax, DGroup
  101.     mov    es, ax
  102.     mov     bx, [bp+4]
  103.     mov     si, bx
  104.     mov     bx, 03h
  105.     int     7Ah
  106.     push    ds
  107.     pop    es
  108.  
  109.     pop     bp
  110.     ret
  111. _IPXSendPacket endp
  112.  
  113.  
  114. _IPXScheduleIPXEvent proc near
  115.     push     bp
  116.     mov     bp, sp
  117.  
  118.     mov    ax, DGroup
  119.     mov    es, ax
  120.     mov     bx, [bp+6]
  121.     mov     si, bx
  122.     mov     ax, [bp+4]
  123.     mov     bx, 05h
  124.     int     7Ah
  125.     push    ds
  126.     pop    es
  127.  
  128.     pop     bp
  129.     ret    
  130. _IPXScheduleIPXEvent endp
  131.  
  132.  
  133. ;Parameters
  134. ;    On Entry:    Pointer to ECB
  135. _IPXCancelEvent proc near
  136.     push     bp
  137.     mov     bp, sp
  138.  
  139.     mov    ax, DGroup
  140.     mov    es, ax
  141.     mov     bx, [bp+4]
  142.     mov     si, bx
  143.     mov     bx, 06h
  144.     int     7Ah
  145.     push    ds
  146.     pop    es
  147.  
  148.     pop     bp
  149.     ret
  150. _IPXCancelEvent endp
  151.  
  152. ;Parameters:
  153. ;    On Entry:    Parameter to swap
  154. ;    On Exit:    Returns swapped integer in AX
  155. _IntSwap    proc    near
  156.     push    bp
  157.     mov    bp, sp
  158.  
  159.     mov    ax, [bp+4]
  160.     xchg    ah, al
  161.  
  162.     pop    bp
  163.     ret
  164. _IntSwap    endp
  165.  
  166. _TEXT    ends
  167.     END
  168.  
  169.  
  170.